﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace OTPlus.Core.Storage
{
    public class ThreadSummaryItem: Content.IThreadSummary
    {
        public ThreadSummaryItem()
        { }

        public ThreadSummaryItem(Content.Activity activity)
        {
            this.ActivityID = activity.ID;
            //this.Pages = activity.Replies / 20; //TODO: Better math *and* it has to match the other page calculator(s) in the project.
            this.Replies = activity.Replies;
            this.Title = activity.TitleShort;
            this.Published = activity.Published;
            this.ActorName = activity.Actor.Name;
        }

        public String ActivityID { get; set; }
        public String Title { get; set; }
        public DateTime Published { get; set; }
        public Int32 Replies { get; set; }
        public String ActorName { get; set; }
    }
}